#!/usr/bin/python3
# -*- coding:utf-8 -*-
"""
在类中定义__call__()方法，实例就可以被像方法一样调用
"""


class Student(object):

    def __init__(self, name):
        self.name = name

    def __call__(self):
        print(self)
        print(self.name)

    def __str__(self):
        return 'Student Object %s' % self.name


def main():
    s = Student('wangnan')
    s()


if __name__ == "__main__":
    main()
